Dynomotion

Group: DynoMotion Message: 15253 From: moray_cuthill Date: 12/17/2017
Subject: Tool Offset setting problems

I've just been trying to set up tool offsets, and I've hit a couple problems.


This is all using the ToolTableSet.c example as provided with no edits.

When I click the user button to update the tool table, the tool table does update, however the DRO doesn't reset until I re-select the tool (either selecting it again from the drop down menu, or by opening and closing the tool table).
Is this normal?

My other problem is as soon as the tool table has been updated, the persist/UserData variable (#12) used to store my tool carousel position gets changed. On tool 101, it changes to 0, and tool 102, 0.3.
I tried changing the persist variable number used by ToolTableSet.c, but I still get the same result.

I don't know if it makes any difference, but I'm using the slot IDs. So just now during setup, tool 101 is in slot 1, and tool 102 in slot 2.

If needed, I can provide any relevant files.

Moray
Group: DynoMotion Message: 15254 From: Tom Kerekes Date: 12/17/2017
Subject: Re: Tool Offset setting problems
Hi Moray,

The DRO should be affected by a change in the Tool Table if tool length compensation for that tool is currently in effect.  That is if an HxxxG43 is in effect.  If tool length compensation is turned off then it wont have an effect.  There are options in the Tool Setup to have editing the Tool Table or the Tool Dropdown to automatically turn on tool length compensation.  So that's probably why the DRO changes after those operations.  I suppose it might make sense to do the same when KFLOP changes the tool table.  If you are running your code from a User Button you could turn on compensation with an MDI command like HxxxG43.  But that isn't allowed from an MCode as the Interpreter isn't re-entrant.

Regarding persist Variable 12:  The communication between KFLOP and KMotionCNC needs several temporary persist variables to pass info such as current tool ID, slot, units, etc.   The define:

#define TMP 10 // which spare persist to use to transfer data

specifies which persist variables to use for this purpose.  I suppose we should be more clear that in some cases several consecutive persist variables will be used.  You will need to change this so as to not conflict with your other usage.

HTH
Regards
TK


 

On 12/17/2017 12:35 PM, moray.cuthill@... [DynoMotion] wrote:
 

I've just been trying to set up tool offsets, and I've hit a couple problems.


This is all using the ToolTableSet.c example as provided with no edits.

When I click the user button to update the tool table, the tool table does update, however the DRO doesn't reset until I re-select the tool (either selecting it again from the drop down menu, or by opening and closing the tool table).
Is this normal?

My other problem is as soon as the tool table has been updated, the persist/UserData variable (#12) used to store my tool carousel position gets changed. On tool 101, it changes to 0, and tool 102, 0.3.
I tried changing the persist variable number used by ToolTableSet.c, but I still get the same result.

I don't know if it makes any difference, but I'm using the slot IDs. So just now during setup, tool 101 is in slot 1, and tool 102 in slot 2.

If needed, I can provide any relevant files.

Moray

Group: DynoMotion Message: 15255 From: Moray Cuthill Date: 12/17/2017
Subject: Re: Tool Offset setting problems
Hi Tom,

Just been out and tried things again. The offsets are now updating as soon as the user button is clicked.
The only thing I done earlier, is I changed from the DefaultKeepOffsetsInches setup file, to the mm version when I first booted everything up.
I wonder if swapping the settings file earlier caused a little glitch?

I also just double checked files and variable numbers, and it was operator error!
Although I edited the variable number in the file I wanted to use, I had loaded up the wrong file in the user button. Loaded the correct one, and things are now working as they should.

Thanks,
Moray



On Sun, Dec 17, 2017 at 9:23 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi Moray,

The DRO should be affected by a change in the Tool Table if tool length compensation for that tool is currently in effect.  That is if an HxxxG43 is in effect.  If tool length compensation is turned off then it wont have an effect.  There are options in the Tool Setup to have editing the Tool Table or the Tool Dropdown to automatically turn on tool length compensation.  So that's probably why the DRO changes after those operations.  I suppose it might make sense to do the same when KFLOP changes the tool table.  If you are running your code from a User Button you could turn on compensation with an MDI command like HxxxG43.  But that isn't allowed from an MCode as the Interpreter isn't re-entrant.

Regarding persist Variable 12:  The communication between KFLOP and KMotionCNC needs several temporary persist variables to pass info such as current tool ID, slot, units, etc.   The define:

#define TMP 10 // which spare persist to use to transfer data

specifies which persist variables to use for this purpose.  I suppose we should be more clear that in some cases several consecutive persist variables will be used.  You will need to change this so as to not conflict with your other usage.

HTH
Regards
TK


 

On 12/17/2017 12:35 PM, moray.cuthill@... [DynoMotion] wrote:
 

I've just been trying to set up tool offsets, and I've hit a couple problems.


This is all using the ToolTableSet.c example as provided with no edits.

When I click the user button to update the tool table, the tool table does update, however the DRO doesn't reset until I re-select the tool (either selecting it again from the drop down menu, or by opening and closing the tool table).
Is this normal?

My other problem is as soon as the tool table has been updated, the persist/UserData variable (#12) used to store my tool carousel position gets changed. On tool 101, it changes to 0, and tool 102, 0.3.
I tried changing the persist variable number used by ToolTableSet.c, but I still get the same result.

I don't know if it makes any difference, but I'm using the slot IDs. So just now during setup, tool 101 is in slot 1, and tool 102 in slot 2.

If needed, I can provide any relevant files.

Moray


Group: DynoMotion Message: 15257 From: TK A2 Date: 12/17/2017
Subject: Re: Tool Offset setting problems
Hi Moray,

I’m still thinking it is still a length compensation on/off issue. If you do anything to turn it on then your program will have an effect on the DRO until you turn it off with a G49. 

Regards
TK

On Dec 17, 2017, at 1:58 PM, Moray Cuthill moray.cuthill@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi Tom,

Just been out and tried things again. The offsets are now updating as soon as the user button is clicked.
The only thing I done earlier, is I changed from the DefaultKeepOffsetsInches setup file, to the mm version when I first booted everything up.
I wonder if swapping the settings file earlier caused a little glitch?

I also just double checked files and variable numbers, and it was operator error!
Although I edited the variable number in the file I wanted to use, I had loaded up the wrong file in the user button. Loaded the correct one, and things are now working as they should.

Thanks,
Moray



On Sun, Dec 17, 2017 at 9:23 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi Moray,

The DRO should be affected by a change in the Tool Table if tool length compensation for that tool is currently in effect.  That is if an HxxxG43 is in effect.  If tool length compensation is turned off then it wont have an effect.  There are options in the Tool Setup to have editing the Tool Table or the Tool Dropdown to automatically turn on tool length compensation.  So that's probably why the DRO changes after those operations.  I suppose it might make sense to do the same when KFLOP changes the tool table.  If you are running your code from a User Button you could turn on compensation with an MDI command like HxxxG43.  But that isn't allowed from an MCode as the Interpreter isn't re-entrant.

Regarding persist Variable 12:  The communication between KFLOP and KMotionCNC needs several temporary persist variables to pass info such as current tool ID, slot, units, etc.   The define:

#define TMP 10 // which spare persist to use to transfer data

specifies which persist variables to use for this purpose.  I suppose we should be more clear that in some cases several consecutive persist variables will be used.  You will need to change this so as to not conflict with your other usage.

HTH
Regards
TK


 

On 12/17/2017 12:35 PM, moray.cuthill@... [DynoMotion] wrote:
 

I've just been trying to set up tool offsets, and I've hit a couple problems.


This is all using the ToolTableSet.c example as provided with no edits.

When I click the user button to update the tool table, the tool table does update, however the DRO doesn't reset until I re-select the tool (either selecting it again from the drop down menu, or by opening and closing the tool table).
Is this normal?

My other problem is as soon as the tool table has been updated, the persist/UserData variable (#12) used to store my tool carousel position gets changed. On tool 101, it changes to 0, and tool 102, 0.3.
I tried changing the persist variable number used by ToolTableSet.c, but I still get the same result.

I don't know if it makes any difference, but I'm using the slot IDs. So just now during setup, tool 101 is in slot 1, and tool 102 in slot 2.

If needed, I can provide any relevant files.

Moray


Group: DynoMotion Message: 15261 From: mmurray70@hotmail.com Date: 12/18/2017
Subject: Re: Tool Offset setting problems
Attachments :
    At first I noticed that the DRO would sometimes update and sometimes not. In my case it was because there was no initial length saved in the table for the tool. So when you measured a given tool for the very first time, the dro wouldnt change. But if you saved over a value it will update. Just put in some value for length on all the tool numbers you plan on using. 

    Also, the tooltableset file seems to factor in your fixture offset (g54/g55 etc) into the equation which is not right. If you set all your tools, change your G54 offset, break a tool and reload/reset length then the new tool does not match the rest. I changed this so it records distance from home position regardless of what fixture you are using. Im attaching the program I use. Just a minor change.

    Everything works good with this program. Always set your tools off some common point like table, toolsetter, 123 block or whatever and then set your fixture offsets (just zero or enter value into dro) with any measured tool and your good to go! No surprises after changing offsets and setting another tool.
    Group: DynoMotion Message: 15262 From: mmurray70@hotmail.com Date: 12/18/2017
    Subject: Re: Tool Offset setting problems
    Attachments :
      Forgot to rename program and it got deleted sorry. Here it is..
      Group: DynoMotion Message: 15263 From: Moray Cuthill Date: 12/18/2017
      Subject: Re: Tool Offset setting problems
      That would make sense, as every time I've tried setting a new offset since the initial attempts, the DRO has updated.
      I'm waiting on some extra collets to set up another couple tools, so I'll try entering a starting value when I set the new offsets.


      I did notice the file adds everything together.
      I'm still trying to decide on the best option for offsets. I'm currently using a 50mm high tool setting gauge sat on top of a vacuum table as the zero point. I know it's not ideal, but it lets me get things set accurately for the current jobs I'm trying to get done.

      It should be easier to figure out, than the lathe offset setting program I done a couple years ago, as at least I don't have to measure anything on the mill.

      Thanks,
      Moray

      On Mon, Dec 18, 2017 at 12:40 PM, mmurray70@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
       

      At first I noticed that the DRO would sometimes update and sometimes not. In my case it was because there was no initial length saved in the table for the tool. So when you measured a given tool for the very first time, the dro wouldnt change. But if you saved over a value it will update. Just put in some value for length on all the tool numbers you plan on using. 


      Also, the tooltableset file seems to factor in your fixture offset (g54/g55 etc) into the equation which is not right. If you set all your tools, change your G54 offset, break a tool and reload/reset length then the new tool does not match the rest. I changed this so it records distance from home position regardless of what fixture you are using. Im attaching the program I use. Just a minor change.

      Everything works good with this program. Always set your tools off some common point like table, toolsetter, 123 block or whatever and then set your fixture offsets (just zero or enter value into dro) with any measured tool and your good to go! No surprises after changing offsets and setting another tool.


      Group: DynoMotion Message: 15264 From: mmurray70@hotmail.com Date: 12/18/2017
      Subject: Re: Tool Offset setting problems
      That will work fine. You can touch your tools off anything, you just need to do the exact same thing each time. If you pull your vacuum table off for something you will have space your tool setting gauge up the same amount for example. And then just make sure you use a measured tool to set program Z zero. Its as easy as that. But you need to change the tooltableset file. I still dont see my attached file?? I dont have any luck with this Yahoo group at all lol. The program is only short so ill try posting the whole thing here:


      #include "KMotionDef.h"

      #define TMP 10 // which spare persist to use to transfer data
      #include "KflopToKMotionCNCFunctions.c"

      #define Zaxis 2

      main()
      {
      int FixtureIndex,Units, TWORD, HWORD, DWORD;
      double NewToolLength,OriginOffsetZ,AxisOffsetZ;
      double Machinex,Machiney,Machinez,Machinea,Machineb,Machinec;

      GetMiscSettings(&Units, &TWORD, &HWORD, &DWORD);

      GetFixtureIndex(&FixtureIndex);

      GetOriginOffset(&OriginOffsetZ, FixtureIndex, Zaxis);

      GetAxisOffset(&AxisOffsetZ, Zaxis);
      GetMachine(&Machinex,&Machiney,&Machinez,&Machinea,&Machineb,&Machinec);

      // Compute Tool Offset to make DRO zero when Tool Length selected and enabled
      //
      // Since Machine = DRO + OriginOffset + AxisOffset + ToolOffset
      //
      // Set DRO = 0 and solve for ToolOffset
      //
      //NewToolLength = RoundToReasonable(Machinez - OriginOffsetZ - AxisOffsetZ,Units); origional line
      NewToolLength = RoundToReasonable(Machinez,Units);

      // Change Currently Selected Tool Length
      SetToolLength(TWORD,NewToolLength);
      }